<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环指令</title>
    <script src="../vue.global.js"></script>
    <style>
        .red{
            color:red;
        }
        .font-big{
            font-size: 50px;
        }
    </style>
</head>
<body>

<div id="App">

    <ul>
        <li v-for="(item,idx) of citys">{{idx}}==>{{item.name}}</li>
    </ul>
    <ul>
        <template v-for="(item,idx) of citys">
            <li  v-if="item.name!='北京'">{{idx}}==>{{item.name}}</li>
        </template>
    </ul>

    <ul>
        <template v-for="(item,idx) of citys">
            <li >{{idx+1}}</li>
            <li >{{item.name}}</li>
        </template>
    </ul>


    <ul>
        <li v-for="item in user">{{item}}</li>
    </ul>

    <ul>
        <li v-for="(value,name,key) in user">{{value}}--{{name}}--{{key}}</li>
    </ul>

    <span v-for="n in 10">{{n}}</span>
</div>


<script>



    const App = {

        data(){
            return {
                citys: [
                    {name: "北京"},
                    {name: "上海"},
                    {name: "广州"},
                    {name: "长沙"},
                ],
                user:{
                    name:"jack",
                    age:100,
                    city:"广州"
                }
            }
        },
        computed:{

        }
    };

    const vm = Vue.createApp(App).mount("#App")


</script>
</body>
</html>